Game Development Community

AAHHHHHH!!! Will The Ray Casting Never End

by Caleb · in Torque Game Engine · 07/31/2006 (7:49 am) · 5 replies

OK, here we go again.

After all my threads on ray casting for melee collision I think I'm finally understanding it. I'm almost done with the raycasting part, but I still can't get one part to work.

I have a function called ShapeBase::getNodePositions that gets the node positons. I have another function called ShapeBaseImageData::getRayInfo that will cast a ray from one node position to the other and will see if it hit anything. Then I have a ConsoleMethod called rayCollision and it's a member of ShapeBaseImageData.

Now heres the problem. I can't call getNodePositions from getRayInfo or rayCollision because getNodePosition is not a member of ShapBaseImage Data.

So what am I going to do? I need to get the updated node positions when ever rayCollision is called.
I can't make getNodePositions a member of ShapeBaseImageData cause nothing would work then.

So please be patient with me, type slow and please help.
Thanks

#1
07/31/2006 (8:54 am)
If all you want is a melee system, I have one here:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10986
#2
07/31/2006 (11:18 am)
Well yes, that's a re-re-packaged version of the RealmWars code, which pretty much does what you want by racyasting between two nodes on a weapon. If nothing else, you could try using it as a reference to get your own setup working.
#3
07/31/2006 (11:24 am)
My game doesn't use the starter.fps and I don't know how to adjust it but thanks anyway.

All I need is a way to call getNodePositions.
Thanks Again.

[EDIT] opps I didn't see the last post, I'll try that.
#4
07/31/2006 (12:39 pm)
Funny topic title ;)
#5
07/31/2006 (3:58 pm)
Well I've had a good look at it but I'm not doing anything like that. My only problem that I know of now, is I can't seem to be able to call my getNodePosition from rayCollision or by script.

If someone knows how to call a ShapeBase member function from a ShapeBaseImageData function or by script that would be GREAT!