Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow locking axes on Follow modifier #15

Merged
merged 2 commits into from
May 29, 2022

Conversation

aXu-AP
Copy link
Contributor

@aXu-AP aXu-AP commented May 28, 2022

This functionality is used for sidescroller (2.5D) and top-down views.

This functionality is used for sidescroller (2.5D) and top-down views.
@aXu-AP aXu-AP mentioned this pull request May 28, 2022
Copy link
Owner

@BtheDestroyer BtheDestroyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely a good addition. I kinda wish GDScript had a feature like bitfields in C++ to make the masking look cleaner, but maybe it can get revisited in the future.

@BtheDestroyer BtheDestroyer merged commit f5f12e4 into BtheDestroyer:main May 29, 2022
@aXu-AP
Copy link
Contributor Author

aXu-AP commented May 29, 2022

There's possibility to group variables in inspector, but it doesn't look much better.
Inspector plugin could be a solution to make it cleaner but is it overkill?

@aXu-AP aXu-AP deleted the Lock-axes branch May 29, 2022 10:23
@BtheDestroyer
Copy link
Owner

Oh, I'm specifically referring to using the variables in code.

//C++
#include <iostream>

struct AxisFlags
{
  // Each of these will take up 1 bit abd be packed into a single byte
  bool x : 1{ false };
  bool y : 1{ false };
  bool z : 1{ false };
};

void main()
{
  AxisFlags enabledAxes{};
  std::cout << sizeof(enabledAxes) << '\n'; // 1
  enabledAxes.x = true;
  if (enabledAxes.y)
  {
    //Much easier to read this way
  }
}

aXu-AP added a commit to aXu-AP/GodotVCamera that referenced this pull request May 29, 2022
commit f02b0c7
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 20:32:42 2022 -0700

    Update README.md

commit 6863b79
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 20:28:22 2022 -0700

    Usage badge links to privacy notice

commit ff03d2e
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 18:21:14 2022 -0700

    Update README.md

commit fb57af9
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 18:11:31 2022 -0700

    Hash project name before sending to usage tracking server

commit bc4ab1c
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 18:03:32 2022 -0700

    Moved VCameraExample scene to Examples; Made VCamera join the vcamera group in the editor so VCameraBrain can be previewed properly

commit 44f7593
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:45:12 2022 -0700

    Moved usage badge to next line.

commit d6da181
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:44:44 2022 -0700

    Typo

commit 24c0756
Merge: f5f12e4 6135df1
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:41:18 2022 -0700

    Merge pull request BtheDestroyer#17 from aXu-AP/VCamera-groups

    VCamera groups, splitscreen example

commit f5f12e4
Merge: da3a39d e9f0eed
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:39:29 2022 -0700

    Merge pull request BtheDestroyer#15 from aXu-AP/Lock-axes

    Allow locking axes on Follow modifier

commit da3a39d
Merge: 95b0eed 8692269
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:38:06 2022 -0700

    Merge pull request BtheDestroyer#20 from aXu-AP/Simpler-cyclic-movement

    Simpler cyclic movement (BackForthMovement)

commit 95b0eed
Merge: 0a20b1a 6a5fe7c
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:29:36 2022 -0700

    Merge pull request BtheDestroyer#14 from aXu-AP/Snap-To-Path-Modifier

    Create SnapToPath.gd

commit 0a20b1a
Merge: 4bc0947 9b3d848
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:28:56 2022 -0700

    Merge pull request BtheDestroyer#13 from aXu-AP/remove-default-environment

    Remove default_env.tres

commit 4bc0947
Merge: 60dddc9 d0b050e
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:28:46 2022 -0700

    Merge pull request BtheDestroyer#12 from aXu-AP/plugin-fix

    Plugin indent fix

commit 60dddc9
Author: Bryce "BtheDestroyer" Dixon <[email protected]>
Date:   Sat May 28 17:26:54 2022 -0700

    Update README.md

commit 8692269
Author: aXu-AP <[email protected]>
Date:   Sun May 29 00:17:06 2022 +0300

    Remove CyclicMovement classes

commit 1c509ce
Author: aXu-AP <[email protected]>
Date:   Sun May 29 00:15:00 2022 +0300

    Create BackForthMovement.gd

    This should be able to replicate all manouvers from CyclicMovement and more.

commit 6135df1
Author: aXu-AP <[email protected]>
Date:   Sat May 28 18:23:45 2022 +0300

    Create SplitScreenExample.tscn

commit 65c5dc0
Author: aXu-AP <[email protected]>
Date:   Sat May 28 17:01:20 2022 +0300

    Allow selecting VCamera group

commit e9f0eed
Author: aXu-AP <[email protected]>
Date:   Sat May 28 13:35:05 2022 +0300

    Changes lock_axes as single flags variable

commit 20b3d0d
Author: aXu-AP <[email protected]>
Date:   Sat May 28 12:23:37 2022 +0300

    Allow locking axes on Follow modifier

    This functionality is used for sidescroller (2.5D) and top-down views.

commit 6a5fe7c
Author: aXu-AP <[email protected]>
Date:   Sat May 28 09:48:30 2022 +0300

    Create SnapToPath.gd

    Modifier for camera dolly movement.

commit 9b3d848
Author: aXu-AP <[email protected]>
Date:   Sat May 28 08:17:40 2022 +0300

    Remove default_env.tres

    No need for this in plugin.

commit d0b050e
Author: aXu-AP <[email protected]>
Date:   Sat May 28 07:45:32 2022 +0300

    Revert "Improve example scene graphics"

    This reverts commit ea8572e.

commit 41efca0
Author: aXu-AP <[email protected]>
Date:   Sat May 28 07:30:47 2022 +0300

    Fix mixed spaces and tabs
@aXu-AP
Copy link
Contributor Author

aXu-AP commented May 29, 2022

Ah sorry I must have been half asleep. That definitely would be a nice functionality! Currently enums are closest we have (but for use case as simple and unchanging as XYZ I felt hardcoding the bits were better fit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants