Creating Collision polygons in code. [resolved]
by Cosmic Logic · in Torque X 2D · 06/19/2009 (11:14 pm) · 2 replies
Is this possible?
I've been playing with trying to make T2DCollisionImages and using the T2DSceneObject.Collision.InstallImage method but no luck so far.
I'll keep playing in the mean time, but if anyone knows how that would be awesome :)
I've been playing with trying to make T2DCollisionImages and using the T2DSceneObject.Collision.InstallImage method but no luck so far.
I'll keep playing in the mean time, but if anyone knows how that would be awesome :)
Torque Owner Christian Rousselle
Default Studio Name
T2DPolyImage Poly = new T2DPolyImage(_Sprite); Poly.CollisionPolyBasis = new Vector2[7] { new Vector2( 0.14677f, -0.66443f), new Vector2( 0.60440f, 0.56309f), new Vector2( 0.42161f, 0.83290f), new Vector2(-0.47336f, 0.83290f), new Vector2(-0.62198f, 0.55556f), new Vector2(-0.17808f, -0.67114f), new Vector2(-0.02857f, -0.79661f)}; _Sprite.Collision.InstallImage(Poly);