Jump to content

Recommended Posts

Trying to make an outer object with an inner hotspot object.

 

The hotspot is the part the player can interact with, while the outer is just for Collision. The problem I am having is...

 

 

If I make the outer object the parent of the inner object, the player can no longer interact with it.

 

If I make the inner object the parent of the outer object, then the outer object looses its Collision.

 

 

help T_T

Kk, the long story :grin:

 

I am making a custom Pond, that is fishable.  This pond is...

 

 inst.Transform:SetScale(2, 2, 2) --Using the same anim as the normal pond atm, just making it bigger

MakeObstaclePhysics(inst, 15.6) --Makes it so its hit box is large and stops player from walking in the water.

 

 

Now this works, however Fishing is quite odd...  It seems the player can fish at this pond from a long distance, to the point of about 3 beefalo away from the ponds hitbox itself!!!

 

So collision good, fishing bad.

 

 

To fix this issue I was thinking about making another Pond, aka Hotspot. This pool will be inside the larger collision Pond. The collision pond will no longer be fishable.

 

Hotspot will not be using the inst.Transform:SetScale(2, 2, 2), but insteed...

MakeObstaclePhysics(inst, 5) --To make its hit box big enough to fix at from the border of the collision Pond.

 

 

I need a way to place the Hotspot inside the Collision pond w/o the collision pond overlapping it or blocking the players mouse from interacting.

 

Figured using the parent / child thing would be the best route... but as stated above in the thread, is collision pond is a child of hotspot, collision pond no longer has its collision.

Edited by JadeKnightblazer

@JadeKnightblazer, You definitely don't have to do it with tiled. You could just have it spawn the collision object in the constructor for the other, and center it on its position. Since you're doing that, you probably also want to make the collision object not persist (inst.persists = false), because otherwise each time you reload it'll make a new one.

Being going back and forth trying to make them spawn one way, then the other.  The collison pond hitbox just keep overwriting the hotspots =/= fishable after that.

 

 

Also messing around with different physics to see which one ones the best.

Edited by JadeKnightblazer

@JadeKnightblazer, I'm guessing it didn't have a position until after the constructor finished, so spawning it within the constructor wouldn't work. I'd expect using inst:DoTaskInTime(0, SpawnHotspot) to work, as well (this pushes it onto the next sim tick).

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
×
  • Create New...