Download

Questions about Skeletal Mesh Actors and Rigid Bodies.

DEAR MODERATOR,

My sincerest apologies. I have posted this in the wrong forum due to having multiple tabs open. Please move this to the C++ section if it isn’t too much trouble. Thanks in advance.

Question 1. I have a class that inherits skeletal mesh actor. I put code that needs to execute continuously in Tick(DeltaTime);

In the .h



virtual void AVRMeleeWeapon::Tick(float DeltaTime) OVERRIDE;

In the .cpp


void AVRMeleeWeapon::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

	GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Blue, TEXT("I'm ticking"));
}

I added this message because it seemed like none of the code was executing, and this message never appears. It would seem that the actor is not ticking at all. How do I make it tick?

SetActorTickEnabled(true); I tried this in the constructor, which resulted in U4 crash on trying to load my game module, so this is not the solution lol.

Question 2. My character has the ability to pick up rigid bodies with a constraint on his hand. Is there an easy way to opt a specific actor (the character) out of collision with another actor. A picked up rigid body will still need to collide with other characters, but I don’t want the character holding it to be able to fly around Silver Surfer style. I also don’t want him to fly off the map from holding it too close to himself.