Game Development Community

Can pickLine get point of collision???

by Tim Kin Chu · in Torque Game Builder · 08/01/2006 (10:39 pm) · 6 replies

Can pickLine get point of collision???

I want to get the point of collision also.

is there something like this???

Or i need to make a long long scene object to detect its collision????

#1
08/01/2006 (10:50 pm)
CastCollision() ?
#2
08/02/2006 (4:27 am)
Can you tell me how to use it ??

i use pickline to get the object -> %obj

then use %obj.castCollision ???

I want to get the point of collision of the "pickline" and the obj picked~
#3
08/02/2006 (11:31 am)
TGB Reference

Maybe that'll help. It will return your point of collision as a vector.
#4
08/02/2006 (4:02 pm)
I was looking at this today myself as I need a line of sight test to see if i can shoot an enemy. castCollision() is our only tool for doing this. I haven't tested this yet, but i believe that you could create a temporary dummy SceneObject with a small collision shape with castCollision() to fake a line collision test. It's a horrible waste of resources... as all you need is an instantaneous test.... but it would work.
#5
08/02/2006 (9:06 pm)
Quote:
TGB Reference

Maybe that'll help. It will return your point of collision as a vector.

use the object I pick to call castCollision ????

but it return nth.
#6
08/08/2006 (9:59 am)
I asked about something like this almost a year ago here.

The problem still persists, there is no elegant way of doing things as line-of-sight detection against tiles in a tile layer.

Edit: And this was my post on the suggestion board.
I've been out of touch with T2D... TGB, or whatever you call it these days. Anyone feel free to mention if this has been worked on since last September.

--
Hans