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 / (DBPro) Need help making 2d race car turn properly

Author
Message
EvilBooger
16
Years of Service
User Offline
Joined: 20th Dec 2007
Location:
Posted: 24th Feb 2008 02:42 Edited at: 24th Feb 2008 07:18
I have the code right to make the car move but the turning doesn't work. I thought I could achieve this simply by rotating the sprite but this doesn't work right with me.

The car sprite is from GTAzz(http://azz.gouranga.com/carmanager2/cars.shtml)

Attachments

Login to view attachments
A Tea Spoon
17
Years of Service
User Offline
Joined: 23rd Apr 2007
Location: good ol USA!
Posted: 24th Feb 2008 06:06 Edited at: 24th Feb 2008 06:08
try offsetting the sprite

[quote]
from DBP Index

OFFSET SPRITE
This command will shift the position of the drawn image without affecting the coordinate of the specified sprite. You can use this
command to change the visible sprite in relation to the coordinates you use to position it. The parameters should be specified using
integer values.

SYNTAX
OFFSET SPRITE Sprite Number, XOffset, YOffset


your sprite is rotating on the top left corner. use this command to move the point where it turns, where you want it is the middel

EvilBooger
16
Years of Service
User Offline
Joined: 20th Dec 2007
Location:
Posted: 24th Feb 2008 20:08
Thanks WindowsKiller, that part works great now.

Login to post a reply

Server time is: 2024-09-27 10:30:53
Your offset time is: 2024-09-27 10:30:53