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 / Managing Collision Behavior

Author
Message
Boo
20
Years of Service
User Offline
Joined: 29th Feb 2004
Location:
Posted: 18th May 2004 05:08
A racing track is surrounded by obstacles (mountains), with collision tiles set to restrict the camera from going "through" these obstacles. However, the resulting behavior is for the camera to climb the mountain when a collision marker is sensed.

How do I code the response to replace the climbing effect with a stopping effect, requiring a repositioning of the camera back to the track to contine the race, as one would expect when driving along a racing track?
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 18th May 2004 15:25
The way to stop the camera from climbing would be to store each of the old positions in a variable, like oldX# etc. Then when the camera enters the collision area, you change the coordinates to the old one.

As for repositioning the camera, I'm not sure because I don't know how the camera works in your game. I would assume that it's trailing behind the car that you're driving, but in that case I wouldn't know if the collision would help at all, because the view might constantly change when you dont want it.

Its not a bug, its a feature!
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 19th May 2004 22:14
Hi,

If you're using NG's .DLL you can use the ray checks and then only re-position the camera at the collision coords of x# and z#, not y#, that'll stop any climbing? Actually, you can do that with "set camera to follow" too.

Hard to say without seeing some code or more details

Hope it helps...
Cheers.

Login to post a reply

Server time is: 2024-09-22 10:27:14
Your offset time is: 2024-09-22 10:27:14