Jump to content

[HELP] How do CollShape Coordinates work?


Recommended Posts

colshape createColCuboid ( float fX, float fY, float fZ, float fWidth, float fDepth, float fHeight )

The first point, determined by fX, fY and fZ, is located at the bottom left corner of the cuboid on the ground.

The width, depth and height then determine, how far to the right, forward and up the cuboid should go.

So, an easy way to create a cuboid is to first go to the bottom left corner of your area.

Then save your position and go to the top right corner. Again a save.

Now you use the first x,y,z as fX, fY and fZ. Then you calculate the difference between the second x,y and the first x,y and then that's your fWidth and fDepth.

Now you just have to set your height (fHeight) of your cuboid. For that you could also save a position one more time, while you're up in the air.

EDIT:

Just drew something for you. :)

[attachment=0]cuboid.jpg[/attachment]

Link to comment
colshape createColCuboid ( float fX, float fY, float fZ, float fWidth, float fDepth, float fHeight )

The first point, determined by fX, fY and fZ, is located at the bottom left corner of the cuboid on the ground.

The width, depth and height then determine, how far to the right, forward and up the cuboid should go.

So, an easy way to create a cuboid is to first go to the bottom left corner of your area.

Then save your position and go to the top right corner. Again a save.

Now you use the first x,y,z as fX, fY and fZ. Then you calculate the difference between the second x,y and the first x,y and then that's your fWidth and fDepth.

Now you just have to set your height (fHeight) of your cuboid. For that you could also save a position one more time, while you're up in the air.

EDIT:

Just drew something for you. :)

[attachment=0]cuboid.jpg[/attachment]

k thanks ;)

Link to comment
colshape createColCuboid ( float fX, float fY, float fZ, float fWidth, float fDepth, float fHeight )

The first point, determined by fX, fY and fZ, is located at the bottom left corner of the cuboid on the ground.

The width, depth and height then determine, how far to the right, forward and up the cuboid should go.

So, an easy way to create a cuboid is to first go to the bottom left corner of your area.

Then save your position and go to the top right corner. Again a save.

Now you use the first x,y,z as fX, fY and fZ. Then you calculate the difference between the second x,y and the first x,y and then that's your fWidth and fDepth.

Now you just have to set your height (fHeight) of your cuboid. For that you could also save a position one more time, while you're up in the air.

EDIT:

Just drew something for you. :)

[attachment=0]cuboid.jpg[/attachment]

but what do i have to save 3 times?

Link to comment
That was just an example of how you could get to your values easily.

Just look at the thing I drew. You have to get the positions for the two blue points.

How you get them does not matter.

Ok! thankyou.

you really helped me 60% of all things i need to learn about scripting. :mrgreen:

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...