Hey, so I might go ahead and try this at some point just to see if it doesn’t cause lag spikes, but let me give you an overview of what I’m trying to accomplish.
So, in a game I’ve been working on, there’s going to be a feature where the player can move these crate objects, but there’s additional behavior attached with that where messing with Roblox’s physics isn’t going to work, so I’m gonna use CFrame for the crate movement.
So, if the player moves forward, I’ll need to cast a ray from the player’s facing direction seeing if there’s an object in front of him. Now, this is what I originally thought of trying. If there is an object in front of the player, I could then create a small Region3 the size being the object’s bounding box, and I’d position the Region3 from where the crate is, but I’d apply an offset to it based on how much the crate would move if the player pushed it successfully. This would be to avoid collision, and if there was a collision detected in the Region3, the player wouldn’t move the crate.
However, creating the new Region3s would not happen every frame. Only if an object is detected in front of the player and if the player is currently moving.
Not sure if this would cause performance issues, I might try it any ways just to see, as this sounds like the most reliable way of knowing if there’s going to be a collision at the moved object position.
Thanks!