Jump to content

Getting dimensions of an object


Xabi

Recommended Posts

Posted

Hi, I'm doing a spike strips scripts, so I need the X and Y positions of the spikes strips object corners so I can make a colshape with them.

Any way to get this?

Thanks in advance.

Posted
getElementDimension, getElementPosition, getElementInterior

It isn't that what I'm searching. I want to get the position in X and Y axis of each corner of the object.

Posted

That is hard somehow but not very much, you'll need to getElementPosition, then for left side corner, subtract some numbers from x axis and then add some numbers in x axis to get the right side corner.

Hope you understood the pseudo, although it'll be way too hard to get the accurate positions because in some cases sides are in x-axis and in some cases it'll be in y-axis, you'll have to check how stripes are being placed first.

Posted

I don't get exactly what do u want to do but if i get it right: You can make a collRecentagle for the spike strips and it will trigger if somebody hit or leave the coll.

To create a collShape: Wiki

For check the collision: Wiki

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...