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.

3 Dimensional Chat / Are you smart enough?

Author
Message
AngelHunter
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: England/Scotland
Posted: 4th Sep 2003 01:00
I working on a game by myself and need some help from some smart people (or person). I need an algorithm or snippet that creates a tube from a chain of points in 3d space. My main character leaves a spider like trail of points as it moves and Ive been trying for ages to create a tube behind it but I just cant get it. If anyone can help Ill kiss your feet for a week and reapy you anyway I can.

Jon
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th Sep 2003 01:21
well I don't need kissed feet or anything but I would think as your character moves record his progress (save his coordinates as he goes-at some interval) and then using those coord make object cylinders from point to point to point. Simplistic it may be, but work it will

yoda

-RUST-
AngelHunter
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: England/Scotland
Posted: 4th Sep 2003 01:37
Im looking for something smoother than that. Ive tried something similar, but I want things to be able to move through the tube. The problem isn't as simple as it seems.
Energizer
21
Years of Service
User Offline
Joined: 7th Jul 2003
Location:
Posted: 4th Sep 2003 02:23
Your problem can be solved.
just make tube objects for straight motion and sections for turns,
it will be a lot easyer if your character could turn only in predetermined radiuses.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th Sep 2003 02:41
so make hollowed cylinders in some other 3d ap in pre-determined lengths, do what I said above, build your "tube" with those hollowed-out lengths every so often, bingo you have your tube

???

-RUST-
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 4th Sep 2003 07:17
why not use a single point... then use a distance CoSin function to calculate the distance within a circle around that point - create the vertex points at given intervals of that (say 45º) and then finally use an array and memblock to create the cylinder extention but recording the previous vertex points and then placing the new vertex points in the same order (obviously with another one of the previous points to complete the triangle per loop)

there are plenty of examples of a CoSin routine on here and in many GCSE/Calculus math books, everything else is a case of taking it logically.

although to be honest all i'd so is create a depth sprite and use billboarded plains for it instead.

Login to post a reply

Server time is: 2025-06-26 13:23:05
Your offset time is: 2025-06-26 13:23:05