Home › Forums › Development discussions › Questions
- This topic has 94 replies, 3 voices, and was last updated 8 years, 2 months ago by Akira_San.
November 10, 2014 at 23:25 #536
I experimented and found, that the character box must be a convex hull in order to fall on the ground. It dont touch the ground if its set to a box, is that natural? And thx, i forgot about the speed option.November 12, 2014 at 12:37 #537
The bounding-box != your mesh!
The box is bigger than your mesh in certain areas to include all max and min points.
The convex hull calculates a more sophisticated shape around your object to fit it better.
You might want to use another box as a parent and scale the box to best fit your mesh manually since the convex hull is generally slower.November 13, 2014 at 22:26 #538
Ok, i change the ground to triangle mesh and that works. Now the character walks on the ground. Too bad i lost some of my bookmark links after the pc upgrade…November 15, 2014 at 11:30 #540
That sucks big time. You should do some backups in future before upgrading. It’s not necessary most of the time but sometimes it can be quite handy.November 15, 2014 at 21:31 #542
Yeah, will keep that in mind.November 17, 2014 at 05:44 #545
How to parent a weapon to the hand? Looks like thats not possible, since the player gonna have to switch between them.November 17, 2014 at 08:26 #546
Simply create a new animation in Blender for every weapon (including your hand) and switch between those meshes.
You need a custom animation for every different weapon anyway so this would be a viable solution.
November 17, 2014 at 09:33 #548
- This reply was modified 8 years, 4 months ago by Sponk.
Thx, i was not planning to animate the weapon, it was just going to be parented to the hand since the perspective is isometric. I guess in the future having a support for bones in the editor will do the trick faster.January 11, 2015 at 16:41 #661
Hey I have 3 questions
1)Where can i see the src for everything that is 2D?
2)Besides function onSceneUpdate is there something similar but for draw?
3)I have this code:
— Load a sprite
sprite = Sprite(0,0,180,40,”maps/human.png”, “”)
— Add sprite to the main canvas
— Rotate sprite by 2° every frame
why does it not show me my little spritesheet?January 11, 2015 at 16:50 #662
Did you use the project manager or the editor to install the new SDK?
It is not copied to your project by default since it is still under heavy development.
Use the “Project > Import Lua SDK” menu to do that for your opened project.
After that you should be able to find a new directory named “SDK” in your scripts directory.
It should work then.
The source code for the new API will be copied to the SDK directory, you can view and edit it there. Alternatively you could look in the git repo in “SDK/LuaApi” or on GitHub: https://github.com/Sponk/NeoEditor/tree/development/SDK/LuaApi
About the draw function: No, there is no dedicated draw function. The reason for that is that Neo is multithreaded and Lua is not threadsafe, leading to synchronization problems. This also allows the engine to do some optimizations that would not be possible otherwise.January 11, 2015 at 17:22 #663
I`m just amazed by this engine.I really need to start learn it!January 11, 2015 at 17:30 #664
sprite.position.x += 1 where can i get the delta time so my player wont move like crayzie?January 11, 2015 at 17:33 #665
First of all: Thank you 😀
You don’t need a delta time since onSceneUpdate is getting called at 60 Hz (every 16.6 ms) to be synchronous with physics and engine update. If you want to get the current time in ms you should use “getSystemTick()”.
More info: http://neo-engine.de/documentation/Lua/html/files.htmlJanuary 11, 2015 at 19:05 #666
m having a hard time moving sprites based on x,y.Can you provide me some examples?Because Im planning in adding some collision detection sistemJanuary 11, 2015 at 19:17 #667
You can use “Widget:translate(x,y)” and “Widget:setPosition(x,y)” to do that. the Widget.position field is actually read-only. It will ignore new values written into there.
More info: http://neo-engine.de/documentation/LuaDoc/Widget.lua.html
Btw: Sprite is sub-classes of Widget and thus inheriting all methods 😀
- You must be logged in to reply to this topic.