Jump to content

Search the Community

Showing results for tags 'ship controls'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Starting Zone (EN)
    • Rules & Announcements
    • General Discussions
    • Off Topic Discussions
  • Starting Zone (DE)
    • Regeln und Ankündigungen
    • Novark's Registratur
    • Allgemeine Diskussionen
  • Starting Zone (FR)
    • Règles et Annonces
    • Registres du Novark
    • Discussions générales
  • Beta Discussion
    • Beta Updates & Announcements
    • Idea Box
    • Public Test Server Feedback
    • DevBlog Feedback
    • The Gameplay Mechanics Assembly
    • Streamer's Corner
    • The Builder's Corner
    • Innovation Station
  • Organizations
    • Org Updates & Announcements
    • Novark's Registry
  • Fan Art, Fan-Fic & Roleplay
    • Novark Agora
    • Novark Story Time
    • Novark Art Gallery

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL










Found 1 result

  1. Like the title says, this is probably a simple question but I'm having an issue getting any kind of custom tweaking done in my ship. Hopefully one of you knowledgeable folks can let me know where I've gone wrong. Currently my ship is setup as a flying construct with the mouse-point control method. I figured I'd start with some 'simple' adjustments so that the ship behaved differently when below a certain speed to simplify the landing process. Apparently I was too ambitious, because when I try to fly the ship it locks up the controls and I get a lovely red "LUA Error" message. I did my best to stick to pretty simple code based on what was already in the script so I'm pretty sure my syntax is correct, but I'm new to LUA so I could be way off base. Here's the code I've tried starting with: local autoRollVelThreshold = 50.0 --my created variable local constructVelocity = vec3(core.getWorldVelocity()) --pre-existing variable -- rolls wings level if velocity is below a certain limit defined by the variable autoRollVelThreshold if constructVelocity < autoRollVelThreshold then local targetRollDeg = utils.clamp(0,currentRollDegAbs-30, currentRollDegAbs+30); -- we go back to 0 within a certain limit if (rollPID == nil) then rollPID = pid.new(autoRollFactor * 0.01, 0, autoRollFactor * 0.1) -- magic number tweaked to have a default factor in the 1-10 range end rollPID:inject(targetRollDeg - currentRollDeg) local autoRollInput = rollPID:get() targetAngularVelocity = targetAngularVelocity + autoRollInput * constructForward end It's based on the pre-existing code for the auto-roll parameter, except instead of using the true/false autoRoll variable I'm using the local variable constructVelocity defined elsewhere in flush() alongside my local variable autoRollVelThreshold which sets the speed at which the action takes place. I thought this would be a simple start to something more complex but it appears I've got some basic issues I still need to get sorted. Any help would be greatly appreciated, thanks.
  • Create New...