pickleplayer Posted October 11, 2015 Share Posted October 11, 2015 As in; when I do GetEntityAtPoint(x, y, z) (or something like that) what determines how close the coordinates have to be to an entity actually detect that entity? Currently, the detection radius feels pretty big. I can be fairly far off from the entity and the game will still pick it up. from like 1 or 2 units away. Is it because the entity's defined "size" is really big, or because the entity detection radius is really big? What exactly determines the "size" of an entity? is there a set size for every entity? Is it determined by the physics hitbox set for the prefab? (it sure doesn't feel like it. shrinking the physics hitbox doesn't seem to do much). Is it determined by the sprite sizes? Or is an entity actually only a single point, and the GetEntityAtPointwhatever has a very large detection radius? Is there a way to change the detection radius? Is there a way to change the entity's size? Or hitbox or whatever it's called? To make the detection more precise? I've got all the weird questions, I just can't find any answers. Link to comment https://forums.kleientertainment.com/forums/topic/58429-what-exactly-determines-the-size-of-an-entity-by-the-game/ Share on other sites More sharing options...
Mobbstar Posted October 11, 2015 Share Posted October 11, 2015 (edited) I think it's the thing you can see when pressing backspace after spawning or selecting an entity using the console. EDIT: Alternatively, maybe look into physic shapes? Edited October 11, 2015 by Mobbstar Link to comment https://forums.kleientertainment.com/forums/topic/58429-what-exactly-determines-the-size-of-an-entity-by-the-game/#findComment-679378 Share on other sites More sharing options...
Arkathorn Posted October 11, 2015 Share Posted October 11, 2015 You could bypass this by specifying the radius, using TheSim:FindEntities(x, y, z, radius). Link to comment https://forums.kleientertainment.com/forums/topic/58429-what-exactly-determines-the-size-of-an-entity-by-the-game/#findComment-679389 Share on other sites More sharing options...
pickleplayer Posted October 12, 2015 Author Share Posted October 12, 2015 You could bypass this by specifying the radius, using TheSim:FindEntities(x, y, z, radius). Ahh, yes this is exactly what I was looking for! So, from my testing, it turns out that entities are defined as a single point. (and I had my search radius set to 3 without realizing it, which is why it felt so big. oops) So thats good. But is there still a way to increase the defined size of the entity? I'm guessing there isn't, but you never know. Or even better, is there a way to search for something like the entity's physics hitbox instead? Currently, the only other "FindWhatever" functions I see in the pastebin site for the don't starve api are FindLandNextToWater (very useful for kaji) FindFlower and FindLight. Link to comment https://forums.kleientertainment.com/forums/topic/58429-what-exactly-determines-the-size-of-an-entity-by-the-game/#findComment-679592 Share on other sites More sharing options...
pickleplayer Posted October 12, 2015 Author Share Posted October 12, 2015 I think it's the thing you can see when pressing backspace after spawning or selecting an entity using the console. EDIT: Alternatively, maybe look into physic shapes? Wooaaa, I had no idea backspace showed all that stuff. That's very usefull. Is there any way to get that information to show up for entities? Or is it hard coded into the game that way? I've also already looked at physics shapes. But increasing and decreasing their size doesn't change the detection. Theres only two, or at least there are only two used in the games code. Spheres and capsules. I wonder if there are other shapes available that just aren't used in the game's code Link to comment https://forums.kleientertainment.com/forums/topic/58429-what-exactly-determines-the-size-of-an-entity-by-the-game/#findComment-679594 Share on other sites More sharing options...
Arkathorn Posted October 13, 2015 Share Posted October 13, 2015 I'm pretty sure that the game uses JBullet, but I might be mistaken. If so, it seems likely that other JBullet physics shapes would be available. Link to comment https://forums.kleientertainment.com/forums/topic/58429-what-exactly-determines-the-size-of-an-entity-by-the-game/#findComment-679717 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now