Jump to content

Recommended Posts

Posted

I have a third person character controller, the character has pickmode(0).

I can walk around and have obstacles between the player and the cam , but nothing happens?

 

 

the self.pivot is a pivot which is at the center of the character (the camera focus).

 

updateworld:

 

 

if self.entity.world:Pick(self.pivot:GetPosition(),self.camera:GetPosition(),pickinfo,0,true) then

 

 

local model2 = Model:Box()

model2:SetPickMode(0)

model2:SetPosition(pickinfo.position)

model2:SetColor(0,1,0)

System:Print(">> PICKED")

--self.camera:SetPosition(pickinfo.position)

 

end

Posted

When I did this for one of my games I used Collision.LineOfSight in the Pick() and set all the environment to Scene. Also, I would pass true to both GetPosition() calls, if they don't share the same parent they could be in different coordinate space.

  • Upvote 1
Posted

When i get the global position with GetPosition(true) , it works fine. Same as my last problem ._.

When I did this for one of my games I used Collision.LineOfSight in the Pick() and set all the environment to Scene. Also, I would pass true to both GetPosition() calls, if they don't share the same parent they could be in different coordinate space.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...