Hi Folks,
I have a really simple level where pawns can push a ball around. I want to detect if the ball is pushed outside of the central square area.
I spawn the ball (subclass of KActorSpawnable) at the start of the level using unrealscript, and have created trigger volumes in the editor, with trigger events in kismet to capture the touch events and play a sound.
I've been banging my head against a wall for some time now... How do I set things up so that the ball actually fires the touch event that I set up in kismet?
Heres my ball, the KActorSpawnable subclass:
Also, how would I change the shape of the trigger volume to a cuboid?Code:Class TTBall Extends KActorSpawnable Placeable; Simulated Event Tick(Float DT) { //Do Gravity GravityForce( DT ); } Simulated Function GravityForce( Float DeltaTime ) { StaticMeshComponent.AddForce(vect(0,0,-9.8)); } Simulated Function AddForce( Vector force ) { StaticMeshComponent.AddForce(force); } Simulated Function SetRBLinearVelocity( vector aVelocity ) { StaticMeshComponent.SetRBLinearVelocity(aVelocity); } DefaultProperties { Begin Object Name=StaticMeshComponent0 StaticMesh=StaticMesh'tiki-taka.bigball' bNotifyRigidBodyCollision=True HiddenGame=False ScriptRigidBodyCollisionThreshold=0.001 LightingChannels=(Dynamic=true) AlwaysCheckCollision=TRUE BlockZeroExtent=true collideActors=true End Object bNoEncroachCheck=false Components.Add(StaticMeshComponent0) StaticMeshComponent=StaticMeshComponent0; CollisionComponent=StaticMeshComponent0; collisionType=COLLIDE_TouchAll; bWakeOnLevelStart=true; bBlockActors = true; Physics=PHYS_RigidBody } simulated event PostBeginPlay() { Super.PostBeginPlay(); StaticMeshComponent.WakeRigidBody(); }
Many thanks in advance,
Peter



... How do I set things up so that the ball actually fires the touch event that I set up in kismet?
Reply With Quote
.

Bookmarks