Game Development Community


#1
03/08/2005 (5:18 am)
I believe you can simply create a datablock with a size definition, no image definition, and a collision definition. Worth a shot, at least..
#2
03/08/2005 (5:50 am)
Yes, just use a fxSceneObject2D. They don't render anything but have all the core capabilities such as collisions, physics, picking etc.

The ability to add entry/exit trigger zones is on the list though.

- Melv.
#3
03/08/2005 (10:41 am)
You can setup a fxSceneObject2D just as you would a sprite. Setup its collisions and you will get a standard callback if anything hits it.

new fxSceneObject2D(goalTrigger) { scenegraph = t2dscenegraph; };
goalTrigger.setImmovable();
goalTrigger.setGroup( xxxxxx );
goalTrigger.setLayer( xxxxxx );
goalTrigger.setCollisionActive( false, true );
goalTrigger.setCollisionMasks( groupsToHit, layersToHit );

This object is setup to receive collisions from "groupsToHit"/"LayersToHit" (whatever you want here).

- Melv.
#4
03/08/2005 (1:35 pm)
I'm really confused now. ;)

Can you post your code? You do know how to size an object?

- Melv.
#5
03/08/2005 (3:17 pm)
@Rob: Not at all mate.

I'm about to go to sleep (so knackered), I'll check this out in the morning for you. :)

- Melv.
#6
03/09/2005 (4:24 am)
Robert: You're being naughty again! ;)

As it mentions in the reference doco, "setCollisionScale()" only accepts parameters between 0 and 1 where 1 is the size of the object. If you want a bigger object then use the standard "setSize()" as you would any other T2D object.

Typically, you'd only want to use "setCollisionScale()" when you've got a standard polygon shape and just want to size it inside the objects size.

Other than that, you should be ready to rock. :)

- Melv.
#7
03/09/2005 (4:43 am)
I can't draw for toffee, I wish I could, I really do!

Each to their own fu!

Good Luck.

- Melv.