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 / Flying through hoops

Author
Message
Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 3rd Mar 2003 20:18
Ive been thinking lately about how to implement loops to fly through in the game but I cant figure out how I will do it. If I model a hoop, the middle is empty so how would I check for "collisions" going inside the hoop?
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 3rd Mar 2003 21:34
Uhm, a crude method would be to make an invisible object inside the loop, like

if object collision(playerObj, loop)=1 and object collision(playerObj,invObj)=0 then ***colision***

if object collision(playerObj, loop)=1 and object collision(playerObj,invObj)=1 then ***fly on***

Whatever I did I didn't do it!
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 3rd Mar 2003 22:35
Yea but you would have to use SIN and stuff to implement the circular effect.

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 4th Mar 2003 00:09
To make it easy for yourself I would use axis aligned hoops, so you don't have to mess about with angles. Then you can do simple box and circle collision. Check whether the player object is or has passed between the front and back of the hoop (a thin space) and then check to see the distance of the player object from the centre of the hoop in 2 dimensions, if the player is within a certain radius then they are in the hoop, and can be marked as having passed through it.

Once I was but the learner,
now, I am the Master.

Login to post a reply

Server time is: 2024-09-19 22:35:34
Your offset time is: 2024-09-19 22:35:34