Jump to content

Haydenmango

Members
  • Posts

    434
  • Joined

  • Last visited

Posts posted by Haydenmango

  1. Yeah it will generate the Character Controller cylinder physics which is unwanted in many cases including this one most likely.

     

    A work around is to move your entity and then make an invisible entity with character physics that will follow it (using SetPosition() and SetRotation()). Give your entity Debris collisiontype to avoid collisions with the invisible entity(with Character Controller physics) following it.

    Might not be perfect but that is what I am doing until I can make custom collision responses and it works pretty good.

    • Upvote 1
  2. I ran out of room on my scene tab the other day and now I am running into issues. I can no longer drag entities from my scene list because they aren't visible on my scene list. Also it is hard to find where I placed things and overall the scene tab is pretty useless at this point.

     

    I would suggest 1. Don't allow the scene tab to end.

    and 2. A search function in the scene tab where you can type in a name and then all the entities in your map with that name will appear on the scene tab.

     

    Little video just to show what I mean more clearly --

     

    https://www.youtube.com/watch?v=jagw-0OK-Yg&feature=youtu.be

  3. You may have tried this before but referring back to my example above what if you made pickend equal to the pickinfo.position? That should get rid of the distance between entities problem and should instead give you the distance between your entity and your pick position. Or tp_toPick.position in your case.

    It would look like

    if self.entity:GetPosition():DistanceToPoint(pickinfo.position) < maxdistance then etc.

  4. Some control would be nice. smile.png

     

    edit--

     

    I just remembered seeing this post a while back that was talking about how you can change collision response types. I've never gotten it to work though.

     

    http://www.leadwerks.com/werkspace/topic/9109-collision-response-types/page__hl__collision%20type#entry69329

     

    Yes, it's just a little convoluted:

    PhysicsDriver::GetCurrent()->virtual void SetCollisionResponse(const int collisiontype0, const int collisiontype1, const int response);

     

    That should really be simplified.

  5. Try to use a World Pick it gives you a starting Vec3 point and an ending Vec3 point for your pick.

     

    http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/world/worldpick-r502

     

    If you need the camera pick for whatever reason I think you could also calculate the distance between your pick point and your pick start manually. Something like --

     

    if pickstart:GetPosition():DistanceToPoint(pickend:GetPosition()) < maxdistance then etc.

     

    pickstart, pickend and maxdistance are the changeable values.

  6. You can friend me on steam if you'd like my account name is haydenmango, I live in Hawaii so I might not always be available although I am online a lot. All I had to do to get the water to work in a new map was this-

    1. Drag the waterplane prefab into your map.

    2. Click on the camera and go to the Camera tab and check use.

     

    If it still doesn't work or if you need help implementing it in a different way let me know.

  7. Are you using Steam Indie edition? If so does the file download or do you get an error?

    If you don't get an error are you having trouble setting it up? I could help you with setting it up. (if you are using Steam Indie Edition)

  8. My problem is that the weapons collision shape doesn't change back to normal when it drops. I imagine that it keeps the shape it inherited from its parent.

     

    Just wanted to say that this issue was fixed at some point.

    I can now drop my weapon entities without using Instance() and their collision shapes stay the way they should. Final code (somebody may find this useful although you will need to change some things) --

    elseif pickInfo.entity.script.weapon then
     if self.weapon~="torch" then
     if self.weaponentity~=nil then
     self.weaponentity.script:Drop(pickInfo.entity:GetPosition(true),pickInfo.entity:GetRotation(true))
     end
     self.weaponentity=pickInfo.entity
     self.weapon=self.weaponentity.script.name
     self.weaponentity:SetPickMode(0)
     self.weaponentity:SetMass(0)
     self.weaponentity:SetPosition(self.palm:GetPosition(true))
     self.weaponentity:SetRotation(self.palm:GetRotation(true)+self.weaponentity.script.rotation)
     self.weaponentity:SetParent(self.palm)
     self.weaponentity:SetCollisionType(Collision.None)
     self.weaponentity:SetShadowMode(0)
     return
     end
     end
    

    Script.weapon=true
    Script.weaponname=""  --string "Name"
    Script.mass=1 --float "Mass"
    Script.rotation=Vec3(0) --vec3 "Rotation"
    --fighting values
    Script.throwingweapon=true
    Script.damage=5 --float "damage"
    Script.range=2.5  --float "range"
    
    function Script:Drop(position,rotation)
    self.entity:SetParent(nil)
    self.entity:SetMass(self.mass)
    self.entity:SetCollisionType(Collision.Prop)
    self.entity:SetShadowMode(1)
    self.entity:SetPickMode(1)
    self.entity:SetPosition(position)
    self.entity:SetRotation(rotation)
    end
    

  9. Maybe the terrain scale is to high? Look under properties in the terrain tab if you're not sure where to find that.

    I am not sure what else it could be.

     

    edit- I also get black dots on my grass terrain. I don't use a normal either.

  10. When an entities View Range is set to Far,Medium, or Near they will not have any shadows if I am using a Directional Light. If I have a spot or point light they will have shadows regardless of view range. Video --

     

    https://www.youtube.com/watch?v=ppHJhwTrsD8

     

    --edit I tested this on a new a map with the same pine tree model seen in the video but in my new map I can see the entities shadow regardless of its view range setting. Maybe my map is just bugged?

  11. Not sure if this is intended but Near View Range gives my entites No Shadows even though I have turned their shadows to static ( even through scripts). The only way I can see their shadows is by setting the entites View Range to Max. My directional lights view range is set to infinite. I have tried using all different lighting settings (static,dynamic,static+dynamic,etc.) and also have tried turning changing my worlds light quality by throwing self.world:SetLightQuality(0-2) into my App.lua scripts Start() function.

     

    I also can say that turning my entites view range to near (in the editor) only works on entites that don't have a parent. If they have a parent it won't work in game(but it will show in editor) even if I set the parents/parents children view range to near.

     

     

    --edit both of these issues have been fixed! hurrah!

  12. Oh wow! So I used self.entity:SetViewRange(Entity.NearViewRange) in my entities Start() Function and it worked!!! I guess all this time I have just been turning the visibility to near in the editor. Awesome. Problem solved it seems.

×
×
  • Create New...