| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| Smooth Turning models? | |
|---|---|
| Tweet Topic Started: Dec 6 2012, 07:54 AM (227 Views) | |
| tizorna | Dec 6 2012, 07:54 AM Post #1 |
|
Newbie
![]() ![]() ![]()
|
well i was wondering is there a good method to preform this in games, See I'm working hard on this one game but I don't know how this could be accomplished with my game, I'll give some code from my current project to show what i have. Is there a way i could change this code a little to get the smooth rotation? its using a 3rd person camera using perspective set to 0 This in my step invent for the player
i hope this code helps Edited by tizorna, Dec 6 2012, 08:17 AM.
|
![]() |
|
| RonBurgundy | Dec 6 2012, 08:41 AM Post #2 |
|
Forum Borat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Refer to this topic(lol refer). http://s9.zetaboards.com/Ultimate3D_community/topic/7326278/1/#new Or quite simply use angle differnce, compare if the angle difference is positive or negative, then set roty +=1 or -=1. Google angle_difference game maker you'll find the script. |
| !!! DEFEND POP PUNK !!! | |
![]() |
|
| Despellanion | Dec 6 2012, 06:53 PM Post #3 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Doesn't GameMaker have some sort of a lerp function? |
![]() |
|
| Reikyrr | Dec 12 2012, 01:35 AM Post #4 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
EDIT* In the snippet, replace distance with direction I made an example in PHP to get the distance in degrees. http://reikyrr.nl/snippets/distance.txt PHP should not be to hard to translate to GML. variables are seen by the $ mark. You should put this into a function. $distance is the direction your model is in. $point_distance is the direction you want it pointed in. you get negative numbers for turning left. positive numbers for turning right. (You can then calculate the step size by deviding or something) Edited by Reikyrr, Dec 12 2012, 01:35 AM.
|
|
~Inspirational quote~ | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)



2:21 AM Jul 11