Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Limb rotatation headache

Author
Message
Maelstrom
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: United Kingdom
Posted: 19th Apr 2004 01:16 Edited at: 19th Apr 2004 01:17
I'm having a little trouble in accurately rotating limbs. The first section of code is used within a function to move a tank around the landscape. This works ok and gives a nice slow rotation using the curveangle command.



This section of code is used to slowly rotate the turret (limb 3) to point towards the object called cam_obj.


The problem is it doesn't and the turret points in completly the wrong direction. When i reset the y rotation of the tank back to 0 then the turret will point towards the Cam_obj. I think i understand why its doing this and that somehow i need to add the y rotation of the tank to the starting rotation point of the turret. The question is How to do this and successfully use the curveangle command to give a nice slow rotation.

Any answers/advice would be more then welcome.
Maelstrom
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: United Kingdom
Posted: 19th Apr 2004 21:33
Fixed it.

changed:
total#=wrapvalue(atanfull(angle1#,angle2#))

to:
total#=wrapvalue(atanfull(angle1#,angle2#)-object angle y(tank(no).obj))

Login to post a reply

Server time is: 2024-09-22 06:43:55
Your offset time is: 2024-09-22 06:43:55