0

Camera Binding

Anonymous 5 years ago • updated by smithjason0149 4 months ago 4
This discussion was imported from CodePlex

zaurska wrote at 2012-09-03 14:58:

Hi

Can we use binding so the camera follows a moving object?  (the moving object's position being dynamically variable)


Z

 


zaurska wrote at 2012-09-05 14:56:



Answered myself.  More about my lack of binding knowledge than H3D function,  but for general interest for novices like me, this works:

Helix3D should be incorporated into next WPF release!

        <h:HelixViewport3D x:Name="view1" CameraRotationMode="Turntable" IsHeadLightEnabled="True">
            
            <h:HelixViewport3D.Camera>
                <PerspectiveCamera Position="0, -200, 0"  LookDirection="0, 200, 0" FieldOfView="45" UpDirection="0,0,1">
                    <PerspectiveCamera.Transform>
                        <Transform3DGroup>
                            <TranslateTransform3D x:Name="cameraTranslateTransform3D"></TranslateTransform3D>
                        </Transform3DGroup>
                    </PerspectiveCamera.Transform>
                </PerspectiveCamera>
            </h:HelixViewport3D.Camera>
        </h:HelixViewport3D>
then some binding in code since my objects are runtime:
            Binding aBinding = new Binding("OffsetX");
            aBinding.Source = tryMe.outerCasePosition;
            BindingOperations.SetBinding(cameraTranslateTransform3D, TranslateTransform3D.OffsetXProperty, aBinding);

Nice Post. Thanks for sharing information


Internet Marketing

Hi, Thank you Zaurska for explaining H3D function with so much conviction. Coming back to your question Yes you can use binding to follows a moving object by using scripts. Usually, I visit your blogs and get updated through the information you include but today’s blog would be the most appreciable. Well done!! Please also visit: PHP Developers India

Thank you for the auspicious write up. Really great work done. Please also visit my website : Recruitment agencies in Mexico

Hi,

My Name is Jason Smith. I looking for the H3D function script. So I did some search work online and Then I found your forum, After exploring I realize that this forum is perfect for my needs. Thanks you sharing the script. 

Besides all this, I believe in establishing trustworthy relations with my business clients by offering various professional services like guest post services, guest blogging to my client. Apart form work, I love to play soccer with my friends every Sunday.