Game Development Community

Meele attacks not detecting

by fossilnite · in Torque Game Engine · 01/27/2012 (1:54 am) · 1 replies

Hi all, the problem is that when i mount a staticShape , the only thing it collides with is my own playerBody. I did a test in which i created a player and did a swing animation. But when the staticShape collides with the player that was spawned in front of me,onCollision of the staticShape that i mounted wasn't called. And when i mount a staticShape, i can only move in two directions as the mounted static shape keeps on blocking my path. This is nerve wrecking... Is there a way to make the staticShape object actually detect objects that it collides with or is there a way for me to use shapeBaseImage to detect collisions... So far searching online didnt provide me with any proper solutions.

#1
01/27/2012 (8:13 am)
There are few classes that actually do moving collision detection. StaticShape is not one of them. And even the ones that do, unfortunately, don't do it when they are mounted (except perhaps the Vehicle classes... not sure if they can actually be mounted though). For melee, you'll have to look at using raycasts instead.