Ask a Question related to Macromedia Director 3D, Design and Development.
-
Pelleyoo #1
transform.rotation gives me headache
Hello
Im working with an Adventure game like Grim fandango. Currently im working on
this script;
when you get close to an interactive obejct, the characters head will look at
the object with its head. If you rotate the body too much, the head will spin
back to its original rotation relative to the body (it has to be realistic you
know ;P) Everyone who's played Grim Fandango will know what I mean.
THe script is working perfectly. But not everywhere. If the characters Y
position in the world is bigger then the object he'll be looking at's Y
position, then things will get nasty. Nothing seems to work anymore. And now
i've realized what the problem is; if the characters rotation.z gets higher
then 180 then it will switch to -180 and the other way around and the script is
constructed like this "If body.transform.rotation.z - V1 > 100 or < 100 then"
where V1 is the angle the head should rotate to point at the object.
so, is there any way I could..."reset" the characters transform.rotation.z
when hes Y position gets bigger then the objects Y position? Or do you have any
other solutions for my problem?
cheers
Pelleyoo Guest
-
Bit of a headache
Hi all, I have found this bit of javascript to validate a users form input, but the problem is that it does it in steps - ie it will check the... -
Rotation between two transform.rotation vectors.
Hello, I think my subject is pretty straight forward. :) I am looking for a way for my 3D character to slowly rotate between two vectors. The... -
transform.rotation.y in javascript
Hi, How do you write: member("theModel").model("furniture_group").transform.rotation.y = 200 ... in javascrippt? I've tried: var myModel =... -
rotating about parent and "self" with transform.rotation?
Hi is it possible to first rotate a model about its parent node and then rotate it about its own axis (or vice versa - that doesn't matter. The... -
rotation error when using transform
hi all, when i use the transform.rotation to adjust the x and z axis data to 0, the y axiz data will get error(e,g, 76 degree) ..... because the... -
openspark #2
Re: transform.rotation gives me headache
Setting the rotation around the y-axis is not recommended. Instead, you should use the .rotate() method, which rotates the given model a given angle. Or in your case, you could try using pointAt().
openspark Guest



Reply With Quote

