Author Topic: BrickCollision  (Read 1875 times)

wonder why he doesn't use projectiles any more.

Its so that you can still hit bricks with raycasting turned off.

Its so that you can still hit bricks with raycasting turned off.
Badspot is a crafty motherforgeter. But, what does Raycasting do, exactly?


From the tutorial.cs file:
Code: [Select]
package TutorialParentingPackage
{
 ...other code cut...
   function HammerImage::onHitObject(%this,%obj,%slot,%col,%pos,%norm)
   {
      if($Server::MissionFile $= "Add-Ons/Map_Tutorial/tutorial.mis" && !$TutorialCompleted && %col.noBreak)
      {
         ServerPlay3d(HammerHitSound,%pos);
         return;
      }
      Parent::onHitObject(%this,%obj,%slot,%col,%pos,%norm);
   }
 ...other code cut
};
activatePackage(TutorialParentingPackage);

Basically, hammerImage::onHitObject works in exactly the same way as a projectile/onCollision except it can hit non-raycasting bricks.

Badspot is a crafty motherforgeter. But, what does Raycasting do, exactly?

The ability to be hit by projectiles.

The ability to be hit by projectiles.

Yeah it actually does a lot of things. Its used for third person camera positioning, player step-up height etc.

How do you actually give a weapon the ability to use the onHitObject function rather than a projectile? It might be useful for tools like the Duplicator and (normal/fill) spray cans.

I can see the showBricks option in the datablock, does this do it?