BASIC COLLISION TUTORIAL
 

 

This basic tutorial will show you how to make a gun entity, this would be usefull for example in a first person shooter for when characters drop their weapons. It sure beats having weapons that hover 2 feet above the ground and rotate.

To start with we need to set our root directory so that Scythe knows where to find your models. Scythe should go through this with you when you first run it, but you can change it with the ROOT button on the right panel:

The root will also change to your save directory when you save a file, so its strongly recommended that you set the root dir at the start and do not change it when you are in the middle of a project. Remember model paths are local to the path of the physics entity, so make sure you preserve the directory structure you set up.

It is also recommended that you go into the environment options and set the unit scale that matches your game or project. The scale defaults to 1unit = 1meter.

Next we will insert a model, look at the toolbar on the right and select the model file you want, then click insert.

Now this is just a mesh, and in its current state it wont do anything, so we need to attach some primitives. Click on the "Box" button on the right.

Select the box using then use the scale and move tools to begin to shape the box to fit the handle of the gun.

Now align it using the rotate tool

Now do the same again with 2 more boxes to fit the barrel and the trigger guard.

If we now set the model to invisible you can see that we have the rough shape of the gun, enough to provide an accurate collision volume.

Now we need to fuse all of these objects together to make an actor, an actor is a basic physical object. Use Select Mode to select all 3 boxes and the model ( use the selection filter to help you ). Once you have done this click on the actors tab as shown in the shot below, and click on "Create Actor". The whole object should flash white briefly. If you set the selection filter to Actor (3rd one along) then you should now be able to select the whole thing with one click.

 

Thats it, now lets test it. Make sure the ground plane is switched on (Right-click on the viewport labels for the context menu):

The button on the left is the test button -> <-the button on the right turns test mode off and goes back to editing.

You can press the test button multiple times too:

Also, you can create and attach point and spotlights, just treat them as primitives:

 

 

 

 

 

 

 

 

 

HOME | FEATURES | BUY | DOWNLOAD | CONTACT

FORUM | DOCUMENTATION | TUTORIALS | ROADMAP | FAQ

Copyright © 2006 Lo-Fi Games.