You are not logged in.
May I request that the hotspots can also be defined per animation and globally, instead of just globally for all animations of a given sprite? if an animation does not have this definition then the hotspot reverts to the global value.
maybe even defining multiple hotspots, useful for spawning or attaching objects from/to positions other than the sprite's "center"
this would make it easier to create complex objects made of multiple linked ones. and improve parent/child relationships
Remember that snake boss we were working on a few years ago for Dark Forest? or suppose you're making a character whose body parts are different sprites. It could help for such cases.
Last edited by KZR (2018-10-30 22:42:57)
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
May I request that the hotspots can also be defined per animation and globally, instead of just globally for all animations of a given sprite? if an animation does not have this definition then the hotspot reverts to the global value.
The engine already supported that, but we just haven't acknowledged it (it just did not read the input). Will be available in the next build.
maybe even defining multiple hotspots, useful for spawning or attaching objects from/to positions other than the sprite's "center"
You do that using parent-child relationships in SurgeScript (Transform component).
Offline
another thing, set_animation with optional sprite change. if no sprite name is passed on, the animation is changed for the current sprite.
Last edited by KZR (2018-11-01 00:11:53)
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
One month ago I ripped a level maps from Sonic Unleashed in Dolphin Emulator and I find one interesting moment. The engine don't load full level map. It load a small fragment of level map for a particular moment:
what does the player see:
what is actually in memory at this moment:
Open Surge working on the same principle?
Offline
one question:
I noticed you used that big equation for angles in the barrel script.
is it possible that we add functions
angle_to_pos(x,y,targetx,targety) // outputs the angle from this object's position to xy coords.
look_at_pos(xy) //simply set the angle of this object to look at the target coords
rotate_to(x,y,mode,speed) //mode == 0 clockwise 1 counterclockwise 2 closest 3 furthest. delta rotation
distance(x,y,targetx,targety)//linear distance from A to B
either via source code or surgescript? they would be useful for a lot of things, especially projectiles, special effects and simple physics
Last edited by KZR (2018-11-20 14:46:49)
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
Open Surge working on the same principle?
The whole level is stored in the memory, but only the items that are near the camera get updated & rendered. You can bypass this behavior by tagging your SurgeScript entity as awake (or your legacy object as always_active), but it's not recommended to bypass it too much, because this is meant to improve performance.
I noticed you used that big equation for angles in the barrel script.
is it possible that we add functions
angle_to_pos(x,y,targetx,targety) // outputs the angle from this object's position to xy coords.
look_at_pos(xy) //simply set the angle of this object to look at the target coords
rotate_to(x,y,mode,speed) //mode == 0 clockwise 1 counterclockwise 2 closest 3 furthest. delta rotation
distance(x,y,targetx,targety)//linear distance from A to B
either via source code or surgescript? they would be useful for a lot of things, especially projectiles, special effects and simple physics
I'm already doing that. The Transform component already includes some of these functions, and in the next build, I'll be updating it to work with 2D vectors. There will be a new API. Yesterday I submitted code that makes math a lot easier, but I have yet to finish the implementation and the documentation. https://alemart.github.io/surgescript/
Offline
SurgeScript now features Vector maths (version 18.1129-dev). I've changed the API; rather than working with individual coordinates, it now works with vectors. See: Vector2, Transform.
Vectors have been designed in such a way that their functions make them chainable; you can build complex operations using english-based terms, rather than big equations:
distance(x,y,targetx,targety)//linear distance from A to B
Becomes:
distance = transform.position.distanceTo(target.transform.position);
angle_to_pos(x,y,targetx,targety) // outputs the angle from this object's position to xy coords.
Becomes:
angle = transform.position.directionTo(target.transform.position).angle;
look_at_pos(xy) //simply set the angle of this object to look at the target coords
Becomes:
transform.lookAt(target.transform);
rotate_to(x,y,mode,speed) //mode == 0 clockwise 1 counterclockwise 2 closest 3 furthest. delta rotation
Becomes:
transform.rotate(speed * Time.delta); // you'll need some logic
Offline
yay vector maths can't wait to mess with these
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline