Track To Constraint

22 July 2017 21:51
Hello, I do not get the Track To restriction working in b4w, I thought applying it to Blender would automatically work in B4W, would not it? It has to be through the API?
23 July 2017 02:44
Setting up in Blender works. Don't forget to Apply Rotation to your object before setting up the constraint.

Working example .blend file attached.
23 July 2017 10:29
Hello Will, in my case it does not work. I have a blue object that is moving, the blue object is the parent of the yellow object, the yellow object has a restriction so that it always points to the red object and the red object has another restriction for That points to the yellow object. If we launch the animation in Blender it is seen as it works but in B4W it does not. Did you know how ?.
Attached is an example.
Thank you
23 July 2017 12:58
As near as I can tell, you can not apply two constraints to one object. Parenting is a form of constraint. I don't know if this is a bug or just not currently supported by the Blend4Web engine. I was able to apply 'Copy Location' or 'Track To', but not both. If my object was the child of another object, I was unable to get the 'Track To' constraint to work.
Maybe one of the devs could comment on this.
In the mean time, as a work around, you could animate the location only of your yellow object and apply the 'Track To' constraint to keep it pointed correctly.
23 July 2017 13:29
Maybe the solution for your project is using bones and armatures. Have a look at this video.

Blend4Web bone animation documentation.
23 July 2017 13:37
Thanks Will, that solution that you comment is good only that the movement is less perfect. It seems to be that what does not support B4W are 2 restrictions at the time. Another new challenge for B4W.
Thanks again.
26 July 2017 12:24
Currently we do not support recursive constraint relationship.

Another new challenge for B4W.

Please register or log in to leave a reply.