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.

Dark Physics & Dark A.I. & Dark Dynamix / rolling a ball in camera direction? Help plz.... :)

Author
Message
Syncaidius
14
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 15th Jan 2007 11:52
I've managed to get a ball rolling correctly in DP, the thing is, I need it to roll in the direction that the camera is facing.

I badly need help on this one, as i've been trying to figure it out for the last 2 days.

Heres the code for the rolling ball:


It uses an image called Stripe5.png, but you could change that to anything you like.

The controls are:
w,a,s,d - moves ball
Middle mouse button + mouse move or LEFT and RIGHT arrow keys.

I'd really appreciate anybody's help here. Thanks in advance.

Syncaidius
14
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 15th Jan 2007 17:41
Anyone?

Kendor
16
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 15th Jan 2007 18:15
Something like this (just added some trigonometry when applying the force):



Home computers are being called upon to perform many new functions, including the consumption of homework formerly eaten by the dog.
Syncaidius
14
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 15th Jan 2007 18:56
A Huge thank you Kendor. I just tried it and it works fine. I just couldn't get my head round this one.

Thanks for your help Kendor.

Login to post a reply

Server time is: 2019-08-23 11:55:49
Your offset time is: 2019-08-23 11:55:49