Jump to content

Collision not attach to object?


s2sk

Recommended Posts

Hello. Sry for my english.

I creating object:

local element_object = createObject(13025, 123.123, 123.123, 123.123, 123.123, 123.123, 123.123)

 

I creating collision:

local element_col = createColCircle(0.0, 0.0, 25.0)

 

I attach collision to object

attachElements(element_col, element_object)

 

And when i hit collision onElementColShapeHit not call. wtf? what i doing wrong?

But i attach object to collision then everything works. 

attachElements(element_object, element_col) -- change variables

 

Link to comment

lol. In debug mode collision attach on object. Why not call onElementColShapeHit?

20 minutes ago, NeXuS™ said:

I dont know if you can attach colshapes at all. Try to use setDevelopmentMode and showcol.

function onCollision(colShapeHit)

    outputChatBox("COLLISION")
end
addEventHandler("onElementColShapeHit", getRootElement(), onCollision)

 

Link to comment
  • Moderators

An object isn't a streamed able element. There is no way for server-side to know where this colshape is located in the world. (Especially when the client moves the object)

It might be possible based on last set position but even so it is very inaccurate.

 

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