Jump to content

Haydenmango

Members
  • Posts

    434
  • Joined

  • Last visited

Posts posted by Haydenmango

  1. if self.entity:GetAirborne()==false then
    if (speed>self.moveSpeed*0.5) then
    local t = Time:GetCurrent()
    local repeatdelay = self.footstepwalkdelay
    if speed>self.moveSpeed * (1+(self.speedMultiplier-1)*0.5) then repeatdelay = self.footsteprundelay end
    if t-self.lastfootsteptime>repeatdelay then
     self.lastfootsteptime = t
     local index = math.random(1,4)
     self.sound.footsteps.concrete.step[index]:Play()
    end
    end
    end
    

     

    thats because while moving down hill the character is actually in the air and falling, the function above only lets player move while on ground.

     

    Well this happens when moving up hill as well so I'm pretty sure it has nothing at all to do with being airborne but go ahead and do some testing to prove me wrong if you want.

     

    The code snippet you posted only affects the playing of footstep sounds when airborne so I'm not sure how that affects player movement.

  2. It should be possible to demonstrate this with just the FPS controller map, and it doesn't occur there.

     

    Ok well I am testing it with the FPS controller terrain.map and some strange stuff is occuring.

     

    Using the fpsplayer model gives me different results than using a pivot (which is what I am using in my game). While using a consistent set input speed value of 15 the fpsplayers z velocity is 600 while the pivots is 15.

     

    I had to alter the terrain.map slightly to create a better testing area and found that I could recreate the slowing down issue on slopes>30 degrees when using both the fpsplayer model and the pivot as the character controller.

     

    I'm trying to download the new version of obs and set it up right now to record a video to show you what's happening. Do you want the altered terrain.map and FPSplayer.lua I am using for testing?

     

    edit- slowing down seems to actually become noticeable when the slope is >20 degrees

     

    edit- video demonstration uploaded -

    - beware headphone users happy.png -

  3. You could set character vertical position a little bit higher that "height", this will prevent you falling down.

     

    I've tried this.

     

    I am making a game where the player jumps off mountains so there are times when they fall through the terrain and their Y velocity is like -150 so when they are placed back on/above the terrain they just fall through the terrain again.

     

    I need to set the Y velocity to 0 without stopping the characters forward movement.

     

    Also it creates notable flickering when I place the character above the terrain making the game very unpleasant to look at.

     

    Keep in mind that SetPosition break physic calculation and allow an entity to be positionated everywhere without physic support.

     

    You should move you character only using physic functions:

     

    http://www.leadwerks.com/werkspace/page/api-reference/_/entity/

     

    under "Physics"

     

    SetPosition() works fine without using SetVelocity as stated earlier. I am using it to correct the broken physics so I know that it works without physics support.

     

    SetVelocity() is under "Physics" and it isn't working! (that's what this bug report is all about)

     

    Also most of the commands to move a character are actually under "Navigation"

  4. Just made little tests, but I encountered no problem with self.entity:SetVelocity(Vec3(0),true) on character controller... Maybe something else wrong...

    I tested on no beta, 4.1

     

    in which function did you place the phrase ?

    I placed it in the UpdateWorld() function. With it in my game crashes but if I comment it out my game is totally fine. I was trying to use it to prevent my character from falling through the terrain like this -

     

    local pos=self.entity:GetPosition(true)

    local height=terrain:GetElevation(pos.x,pos.z)

     

    if pos.y<height then

    self.entity:SetPosition(pos.x,height,pos.z)

    local v=self.entity:GetVelocity(true)

    self.entity:SetVelocity(Vec3(v.x,0,v.z),true)

    end

     

    but you are using 4.1? I am using 4.2 so maybe this is another new issue.

  5. I am having this issue with a new project I am working on as well. It seems like this was a recent change because I remember being able to rotate without using movement in the past.

     

    Side note: I wish there was more detailed documentation on the Character Controller. It is one of the features of leadwerks that I use the most and have the most trouble with. Learning about the character controller is through trial and error or hunting down information as the tutorial for it doesn't mention detailed information about all of its perks and quirks.

    Things like the x and z rotation being locked, physics shape being preset and unable to be changed, a list of all of the script functions that work/don't work character controllers, etc. would be useful information to have all presented in one place.

    • Upvote 2
  6. I found that my character controller slows down drastically (almost to a complete stop sometimes - seems to be dependent on how fast I am moving) when moving on slopes above 30 degrees.

     

    I understand the character controller can't move on slopes>=45 degrees but slowing down > 30 degrees seems like a major bug.

     

    For example when moving down a steep slope I move slower!

     

    I can provide more information/my project and could make a video showing the behavior if it's needed.

  7. Just recycling the vegetation billboard system would be ideal. Although lods are great, making them kind of sucks.

     

    Yeah, I thought that re-using the vegetation billboard system would be good enough for a lot of cases.

     

    I do think a new LOD system that uses 3d models would be great as well because as gamecreator pointed out a lot of vendors sell LOD versions of their models but I'm not sure how to go about setting that up (maybe add LOD model versions directly into the .mdl files and use them when necessary).

  8. Almost every game these days uses LOD in open environments to keep performance steady and reduce pop-ins. I would like an LOD system (similar to the current system in use by the vegetation system) that can be easily applied to any entity.

     

    I suggest adding a 'Enable LOD' checkbox as well as 'View Range' and 'Billboard' sliders to the appearance tab. When the 'Enable LOD' checkbox is checked an LOD texture should be generated and LOD shaders applied to the specific entity (similar to how adding new vegetation to the vegetation tab works) and the entity should be affected by the LOD system. When unchecked the LOD texture can be deleted, LOD shaders removed from the entity, and the entity should no longer be affected by the LOD system. 'View Range' and 'Billboard' should affect LOD viewing distance just like the vegetation system.

    • Upvote 6
  9. le_shaderbattlegnsic.png

     

    Maybe is personal taste, but I think that the shadmar solution is more consistent and have some subtle color bleeding effect.

     

    The official one is too much, and there is some kind of odd noise in the godrays (?)

     

    le_noisehubsy.png

     

    I completely agree. I have never understood why the official bloom+godrays shader looks so over the top (it's completely ridiculous unless you turn the values waaayyy down) but it seems shaders have never really been the focus judging by how people need to create custom shaders just to have alpha in an animation shader. Hoping to see shadmars shader pack back up soon as it has become a very important addition to leadwerks to me!

  10. Macklebee helped me figure this one out.

     

    I had this as my window creation line -

     

    self.window = Window:Create(self.title, 0,0,self.resolutions[self.rescounter].x,self.resolutions[self.rescounter].y,64)

     

    then I changed it to this and now it works! biggrin.png -

     

    local windowstyle=window.Titlebar

    windowstyle=windowstyle+window.FullScreen

    self.window = Window:Create(self.title, 0,0,self.resolutions[self.rescounter].x,self.resolutions[self.rescounter].y,windowstyle)

    • Upvote 1
  11. I would like to have an option on the vegetation tab in the editor to change pick mode of a specific vegetation layer on or off.

     

    Right now vegetation seems to always have their pick mode set to PolygonPick which means that even transparent vegetation will be in the way of anything obscured by it. This can create bad situations where usable items that end up in bushes are stuck because the player can't pick them up.

    • Upvote 1
  12. Ever since a recent beta update my games window will not render.

    http://www.leadwerks.com/werkspace/blog/1/entry-1746-beta-update-available/

     

    I saw that this was an issue others were having as well and that it has been supposedly fixed.

    http://www.leadwerks.com/werkspace/topic/14952-contextgetwidth-contextgetheight-no-longer-return-valid-info/

     

    My game window still will not render if I use the beta and I can't seem to find out why.

     

    I can revert to the current build and my game window renders correctly. There are no errors being shown and everything is loading the same way as far as I can tell. I am using the Indie Edition and I can provide my project if needed.

     

    Link to a video I made to show my issue -

  13. Hey Angelwolf, sorry for the delayed response. This is a pretty old script so there may be something else wrong but did you add:

    Script.maxammo=200 --int "Max Ammo"
    

    into the FPSgun.lua?

     

    I have a feeling the crash is because the max ammo value is nil until you add that in.

    • Upvote 1
  14. You could be limited to 60 fps due to V-sync being enabled.

    You can change this through code using the context:Sync() command.

    More info - http://www.leadwerks.com/werkspace/page/api-reference/_/context/contextsync-r48

     

    You will find the Sync() command somewhere in the Main.lua by default. If you find context:Sync(true) then change it to context:Sync(false) to disable v-sync and then you should be able to get above 60 fps if your scene isn't to complex.

    • Upvote 2
  15. Does your game crash immediately when GetPosition() is called or does it happen after some time?

    I am curious because I am using GetPosition() in my UpdateWorld() function and my game doesn't crash immediately but I have been getting inconsistent crashes when playing my game lately.

     

    Anyhow, I switched back to the 2015-12 build of leadwerks to see if I still get inconsistent crashes and I need to do more testing to see if switching the build makes any difference in my case.

×
×
  • Create New...