mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 17:53:47 +00:00
editor: fix entity rotation logic
entity will no longer insta-rotate when clicked
This commit is contained in:
parent
0153c977df
commit
5c4e4450ba
1 changed files with 4 additions and 1 deletions
|
@ -2659,7 +2659,10 @@ void SceneEditor::update(float dt)
|
||||||
{
|
{
|
||||||
if (editingEntity)
|
if (editingEntity)
|
||||||
{
|
{
|
||||||
float add = (dsq->getGameCursorPosition().x - cursorOffset.x)/2.4f;
|
float cx = dsq->getGameCursorPosition().x;
|
||||||
|
float ex = editingEntity->position.x;
|
||||||
|
float dx = cx + cursorOffset.x - ex;
|
||||||
|
float add = dx/2.4f;
|
||||||
if (core->getCtrlState())
|
if (core->getCtrlState())
|
||||||
{
|
{
|
||||||
int a = (oldRotation + add)/45;
|
int a = (oldRotation + add)/45;
|
||||||
|
|
Loading…
Reference in a new issue