Skip to main content
GameDev.net gamedev.net
🔒 Locked

rotating question

Started by Penance Oct 30, 2002 at 2:24 AM 0 replies 250+ views
Original Post
Penance
Penance
I have a scene with several objects on a table. I have a camera that circles around the table with keypresses. I want to be able to press a key and have an object move towards the camera and then stay in that exact position as the camera moves. i can get it so that the object moves towards the camera and stays there as the camera continues to orbit the table, but the selected object continues to rotate since the camera is still tehcnically moving around the object. I want it to be like you''ve picked it up and are holding it as you keep walking around the table, looking at the center...thus no rotation of the selected object. All my objects'' vertices are centered about the origin so I figured just rotatef(angleCameraIsAt,0,1,0) to keep the object''s orientation with the camera the same and then translate closer to the camera as usual, but no matter the order (rot, trans or trans, rot) it seems like the rotation is being ignored...i see no change from my already failing results. Please advise! :c/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.