This is a demonstrator mod for how to script various part behaviors. I created this mod a while ago to learn how to move 3D models with code and felt I should share it with the community so other modders (and normal players) can see how it works.
There are five moving blocks contained in the mod, each with different behaviors.
Moving Block 1: A moving block with three rotation axis and three input controllers.
Moving Block 2: A moving block with three translation axis and three input controllers.
Moving Block 3: A moving block with three scale axis and three input controllers.
Moving Block 4: A moving block with three rotation axis, three translation axis, three scale axis, and nine input controllers.
Moving Block 5: A moving block with two models and a button to toggle between them.
The code for these is pretty simple and slightly outdated compared to newer SWL-120 parts; if anyone has any questions relating to the code, feel free to ask in the comments.
I would also like to credit MOPCKOEDNISHE for helping me add more than one input controller to a part, and MVC for some help with scripting.
@324 I didn't even know that existed, although it seems very outdated and I wouldn't even know where to begin (or how).
@PlaneFlightX i mean this one, not reddit
https://simpleplanes.fandom.com/wiki/SimplePlanes_Wiki
@PlaneFlightX i do got a discord, have to find it first)))) barely use an account)
Will post a bit later.
Guess i have to look all the tutorials about making SP and unity mods first anyway))
still think the best way would be to find a way of attaching a second connection point to a part mowing like your's one do
@vonhubert Unfortunately I don't know how to do that; just 3D models. I know there is a way because a mod exists, but this far exceeds my coding knowledge. I suggest you make the flaps themselves move (you can make individual meshes move separately within one part). If you have Discord I can give you a lot of information about this.
@PlaneFlightX Ok, so, i finally got to test it. I can make it move the way i need. But can you please add a second connection point that will move with a part itself?... i wanted to connect flaps there...
@324 While I have viewed the wiki before, I don't actually use Reddit, so I both can't and don't know how.
Btw did you put this on the wiki? some code snippets with explanation will be massively helpful for future modders.
@vonhubert Good luck!
@PlaneFlightX Hi! I do in theory know how it works, looked briefly through some tutorials. And thus i totally know that the part i wanted is easily possible, it should be pretty similar just to your block usnig 2 movement and 1 rotation axis, with movement axis values dependent on rotation angle) Unfortunately simply had no time to try and do it myself, last years happen to be not too easy(
@vonhubert One thing my newer SWL-120 mod parts have, especially the new cockpit screens, is various sub-models that move independently within the same mod part. I do this using a foreach loop to access different models and move them (you can also access sub-models of the sub-models by nesting loops, and so on). If you would like more information let me know.
@vonhubert It uses nine input controllers, one for each axis. If you look at the code you can see how it is possible to manipulate the block any way you like, and changing it to just have one translation axis, for example, is pretty easy. And yes, input controllers support FT.
Curious. It seems like Moving Block 4 is exactly what i wanted to make myself insted of a simple piston from the game, to use it for slotted fowler flaps. Does it take FunkyTrees as an input? Eager to take a look!
i dont really understand
??
@SWL120NEED You should be able to run this plane. I will tag you on an unlisted with more information soon.
sorry if its asking for a lot but i really really cant find anything even near as detailed as this, i litteraly havent flown any simpleplanes aircraft besides the swl10 for the past week
i dont even own the mobile or vr one only the pc version
i have a 3090 im on full pc @planeflightx
@SWL120NEED What are your device specs?
hey, @planeflightx i have been searching for a modern aircraft airliner cockpit for simpleplanes and i cant find any of them, could i have an early acess one even if it doesent have the cabin interior? i really dont mind unless it has the cockpit, even if itys not FULLY functional
@lalalalalion Thanks!
I like your funny words, magic man.
Great job. I really needed this. I really like it.!!
Noice
neat