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 / EASY QUESTION - HARD ANSWER

Author
Message
Deadmaster
21
Years of Service
User Offline
Joined: 14th Mar 2003
Location:
Posted: 27th Apr 2003 16:59
What is the code to make a ball/sphere roll? (I have already tried the code on one of the other bourds.... but cant pick it out )
SURE TO WRECK HAVOC ANYWHERE HE ROAMS - HEEEEEEEEEEEEEEEEEEEEEEERRRRRRREEEEEEEEESSSSSSSSSSS DEADY!!!!!
NachoMan
21
Years of Service
User Offline
Joined: 14th Apr 2003
Location: United Kingdom
Posted: 27th Apr 2003 20:24
instead of using the ball to move (which wouldn't work as the ball would then start going into the floor as it is rotated) you would have to make another object which is hidden. Then you would be able to move this object without it going up/down. You set the ball to the co-ordinates of this hidden object and the ball will move. Now you need to just rotate the object about it's x axis. Hope this helps, i could probably write up a bit of code in DBC if you don't understand.
Nick
Deadmaster
21
Years of Service
User Offline
Joined: 14th Mar 2003
Location:
Posted: 27th Apr 2003 22:22
hmmm.... you might have to, as I really suck at maths and logic

DAREDEVIL SOFTWARE
http://oddball.itgo.com/home.htm
While I am still doing div, almost all future games will be made in DB, so dont litter my guestbook with useless putdowns please
NachoMan
21
Years of Service
User Offline
Joined: 14th Apr 2003
Location: United Kingdom
Posted: 28th Apr 2003 22:10
i have dbc so if u have dbpro then it might not help
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 28th Apr 2003 22:49
I'll use this system in Climber2 (http://sensai.free.fr/attreid/Climber2.rar => some maps are just tests )



I didn't look in my dba i it's right, but it should

Bu$herie
How many civilians is he going to kill ? he's going to burn in hell, and I hope that his pain will make him inderstand !
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 28th Apr 2003 22:50
Quote: "hmmm.... you might have to, as I really suck at maths and logic "


You don't need maths or logic! This is a simple example:



That may have to be modified to fit into your game but it shows the principle.

You are the th person to view this signature.
Programmers don't die, they just Gosub without return....
NachoMan
21
Years of Service
User Offline
Joined: 14th Apr 2003
Location: United Kingdom
Posted: 29th Apr 2003 00:56
That's a good point, you don't actually have to make the ball roll, you can just roll the texture
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 29th Apr 2003 02:34
I would just rotate it on the axis as you would do if you were turning a humanoid model when turning.

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 29th Apr 2003 18:10
Quote: "you can just roll the texture"

no, you can't
if you do so, it's perfect for the sides of the sphere, but not at all for its top and bottom
if you download the demo of my game, you can see (when you're falling down and pressing the up or the down key) that this system is not very nice

david, I really like the maths, so I never use commands as roll, pitch, and turn, I always use rotate x-d
huhu ^_^

look at it


Bu$herie
How many civilians is he going to kill ? he's going to burn in hell, and I hope that his pain will make him inderstand !
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 29th Apr 2003 22:18
Quote: "david, I really like the maths"


Maths?!? Rotate is more complicated than the pitch commands! All replace "pitch" with "rotate" and you get the meaningof those 2 commands:

pitch object up = rotate object upwards
pitch object down = rotate object downwards

You are the th person to view this signature.
Programmers don't die, they just Gosub without return....
NachoMan
21
Years of Service
User Offline
Joined: 14th Apr 2003
Location: United Kingdom
Posted: 30th Apr 2003 00:41
yes but then you do need the rotate commands as well as these for some of the coding
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 30th Apr 2003 22:20
Quote: "yes but then you do need the rotate commands as well as these for some of the coding"


It depends on your game.If you are using turn object left/right for character rotation and move object for movement, in theory no more rotate commands are needed.

You are the th person to view this signature.
Programmers don't die, they just Gosub without return....
Phoenix
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 5th May 2003 02:02
It's actually a pretty easy solution just use this. If you want to rotate it on the x axis use this like I have it. If you want to rotate it on the y or z axis just move the stuff from x to y or z and make x zero.



every time the loop passes it will rotate the object +1.

Sit in reverie and watch the changing color of the waves that break upon the idle seashore of the mind.
Phoenix
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 5th May 2003 02:06
Lol Never mind that wont work. But this will however.



that will rotate it for sure because I tried it with a square.
wether or not it will rotate the sphere along with the texture I do not know.

Sit in reverie and watch the changing color of the waves that break upon the idle seashore of the mind.
Phoenix
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 5th May 2003 02:12
then if you want to give it the effect that it's actually moving you can use



Sit in reverie and watch the changing color of the waves that break upon the idle seashore of the mind.

Login to post a reply

Server time is: 2024-11-24 12:28:29
Your offset time is: 2024-11-24 12:28:29