Collision detection for larger/resized actors

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
fma_lvr
001 Subscriber
 
Joined: Wed Sep 15, 2010 5:02 am

Collision detection for larger/resized actors

Postby fma_lvr » Tue Nov 07, 2017 12:09 pm

I've been wondering if there's a simple way to properly fit collision boxes to a new model without essentially creating separate actors and sprite settings for each possibility. That is, I like the idea of having slight size variations for enemies, but it doesn't work very well if their collision detection won't match.

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Collision detection for larger/resized actors

Postby Mr.Numbers » Tue Nov 07, 2017 5:10 pm

Hmm, if you are using the "Change actor size" event, or using the percentage modifiers in the actor window the collision should properly resize (And does on my end). How are you resizing your enemies?
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

fma_lvr
001 Subscriber
 
Joined: Wed Sep 15, 2010 5:02 am

Re: Collision detection for larger/resized actors

Postby fma_lvr » Tue Nov 07, 2017 6:09 pm

Mr.Numbers wrote:Hmm, if you are using the "Change actor size" event, or using the percentage modifiers in the actor window the collision should properly resize (And does on my end). How are you resizing your enemies?


I'm using size% changes in the actor window I believe. I had it set to 200,200,200 and my character would basically walk through that. I actually have experienced this repeatedly and ended up doing this to a base 'slime', making it massive, and exploiting the lack of proper collision with an enlarged actor by having a sort of "swallowing" mechanic.
Essentially, I'm accustomed to this, but I haven't tried the 'change actor size' event. I suppose I could throw that into a 'change existence' and have it work immediately, as that's what I've done with random stat variations.

It sounds like it should be colliding properly, but it definitely isn't, at least not through size % window changes.

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Collision detection for larger/resized actors

Postby Mr.Numbers » Tue Nov 07, 2017 8:53 pm

Image

That's as close as I can get to the slime with the following actor setup from a default pro template project:

Image


Just to confirm. Setting up an actor this way on your end will not stretch the collision correct? Just want to make sure there's not an option you are picking somewhere that is messing up the collision resizing before sending this off to Mike.
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

fma_lvr
001 Subscriber
 
Joined: Wed Sep 15, 2010 5:02 am

Re: Collision detection for larger/resized actors

Postby fma_lvr » Tue Nov 07, 2017 9:14 pm

Sorry Mr. Numbers, I made a mistake. In the non-slime cases, I was using user-created resources which actually had questionable collision boxes; I was only using some of these on large scales, so I expected that was the issue. For the Slime example, it turns out I had something else at work, involving the slime going invincible at times which allowed you to pass through it momentarily

On another note, I'm still not sure how you would make something effectively invincible while still being able to attack them and collide with them. I suppose that's a separate question, but it would make things easier.
(Yes, I know you can set its hp to 0 but I don't want to have to do that, say, in a boss fight)

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Collision detection for larger/resized actors

Postby Mr.Numbers » Tue Nov 07, 2017 9:26 pm

You could alter their "Attacked" trigger, or temporarily set their "Defense" stat to be really high. Glad to hear it wasn't a bug but just an oversight!
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users