Comments (18)
Hi, we discussed the usefulness of a new sensor of this type, but we are not convinced about, as we can easily do that with a small python script:
eg: if object.worldPosition != previousObjectPosition or object.worldOrientation != previousObjectWorldOrientation: do something.
Write a new sensor requires a big piece of code in several files, and we can't write a new sensor for all what can be done with a little python script.
We haven't decided yet to not do it, but we wanted to ask you in what other cases do you think this new sensor could be useful? Thanks
from upbge.
many units can sit dormant, not polling anything, friendly or enemy/AI and when acted upon from outside influences, activate their logic, for instance a manager could push pieces around, that animate themselves only if they move etc,
if a unit is pushed over a edge, it would trigger the logic that can then play fall animations
basically it allows for many instances of 'ALWAYS' to be replaced with 'Movement'
Even monster agreed it was a good Idea for once
there are actually many use cases (Mines?)
as collision = always for any object under gravity
a 'movement' sensor, would only trigger if it was moved.
from upbge.
@BluePrintRandom : Maybe if you make this sensor more complex we can implement it.
Like let the user choose the precision error, choose an axis, local or global, use rotation, position or scale...
from upbge.
exactly, it could double as a 'is falling' sensor, or a 'is rising sensor' etc,
a property it could also expose is the change in position or the change in orientation,
Thank you,
from upbge.
Other potential uses, for logic based coding,
if local velocity y > x trigger true
Could be used to change animations when a speed threshold is reached in logic, without python,
or a jet could pop out it's landing gear if local y is lower then x without python,
I love python, don't get me wrong, there are just many times when you don't want to run always, and this helps break away from that.
from upbge.
I'm still sceptical... I know that trigger something if an object moves can be useful, as thousand mini scripts that you can do on your own. And we can't do a sensor that does everything. And we can't do thousands sensors.
Always sensor is not a "bad" thing. Anyway, It is executed each frame, as mouse movement sensor (even if you uncheck pulse mode, the states activated, active, released are checked).
Furthermore, you can already do such things with a sensor "actuator" which can check if an actuator is active and has force, dLoc etc... If you want to check if another object is moving you can do that: http://www.pasteall.org/blend/39986 or such things...
I don't know...
from upbge.
I am talking about
always--------(all python to run actor)
vs
movement----(all python to run actor)
and I know of a few ways to efficiently do this anyway using a manager that
tracks all the entities I need a movement sensor in
and just sets a bool (Moved = True)
import bge
cont = bge.logic.getCurrentController()
MovementManager = own
if type(MovementManager['ListOfTargets']) is str:
MovementManager['ListOfTargets']=[]
for objects in bge.logic.getCurrentScene().objects:
if 'MoveTag' in objects:
MovementManager['ListOfTargets'].append([objects,objects.worldPosition.copy())
else:
for objects in MovementManager['ListOfTargets']:
Diff = objects[0].worldPosition-objects[1]
Mag = Diff.magnitude
if Mag>(threshold):
objects['Moved']=True
else:
objects['Moved']=False
objects[1]=objects.worldPosition.copy()
I understand how to do this effectively on my own, however it feels like
it's something that should be already included from day 1.
I can do almost anything in the engine as it is, this would just increase
efficiency and add a layer of polish to the bricks,
On Wed, Jan 6, 2016 at 4:11 PM, youle31 [email protected] wrote:
I'm still sceptical... I know that trigger something if an object moves
can be useful, as thousand mini scripts that you can do on your own. And we
can't do a sensor that does everything.Always sensor is not a "bad" thing. Anyway, It is executed each frame, as
mouse movement sensor (even if you uncheck pulse mode, the states
activated, active, released are checked).Furthermore, you can already do such things with a sensor "actuator" which
can check if an actuator is active and has force, dLoc etc... If you want
to check if another object is moving you can do that:
http://www.pasteall.org/blend/39986 or such things...I don't know...
—
Reply to this email directly or view it on GitHub
#8 (comment).
from upbge.
https://www.youtube.com/watch?v=28sa9eFUJMU&feature=youtu.be here is my own
solution
and the file
http://www.pasteall.org/blend/39987
this is useful for me etc, however it is not as useful to the people still
trying to wrap their head around logic bricks,
etc.
On Wed, Jan 6, 2016 at 5:23 PM, Jacob Merrill [email protected]
wrote:
I am talking about
always--------(all python to run actor)
vs
movement----(all python to run actor)
and I know of a few ways to efficiently do this anyway using a manager
that tracks all the entities I need a movement sensor in
and just sets a bool (Moved = True)import bge cont = bge.logic.getCurrentController() MovementManager = own if type(MovementManager['ListOfTargets']) is str: MovementManager['ListOfTargets']=[] for objects in bge.logic.getCurrentScene().objects: if 'MoveTag' in objects:
MovementManager['ListOfTargets'].append([objects,objects.worldPosition.copy())
else:
for objects in MovementManager['ListOfTargets']:
Diff = objects[0].worldPosition-objects[1]
Mag = Diff.magnitude
if Mag>(threshold):
objects['Moved']=True
else:
objects['Moved']=False
objects[1]=objects.worldPosition.copy()I understand how to do this effectively on my own, however it feels like
it's something that should be already included from day 1.I can do almost anything in the engine as it is, this would just increase
efficiency and add a layer of polish to the bricks,On Wed, Jan 6, 2016 at 4:11 PM, youle31 [email protected] wrote:
I'm still sceptical... I know that trigger something if an object moves
can be useful, as thousand mini scripts that you can do on your own. And we
can't do a sensor that does everything.Always sensor is not a "bad" thing. Anyway, It is executed each frame, as
mouse movement sensor (even if you uncheck pulse mode, the states
activated, active, released are checked).Furthermore, you can already do such things with a sensor "actuator"
which can check if an actuator is active and has force, dLoc etc... If you
want to check if another object is moving you can do that:
http://www.pasteall.org/blend/39986 or such things...I don't know...
—
Reply to this email directly or view it on GitHub
#8 (comment).
from upbge.
Could you please draw the sensor as you imagine it and I'll try to make something
from upbge.
And here we are
there is room for expansion etc, But I think the dropdown would have
(magnitude) , (Axis -X) , (Axis X) , (Axis Y), (Axis -Y) etc
and a check box for local / world
and potentially another brick (Rotated)
Thank you again,
BPR.
from upbge.
I made it. I'm waiting for the other devs opinion about. It still has to be improved... http://www.pasteall.org/63236/diff
from upbge.
Thank you, it opens up very easy to use character animation to novices.
and will allow for less logic usage for python professionals.
I looked through the diff, I did not see a 'Any' type flag, that is what I meant by magnitude,
like
if Moved magnitude---------Python
from upbge.
@BluePrintRandom : see 205e1b4 in https://github.com/UPBGE/blender/tree/ge_movement_sensor. Can you test if it works properly ? Other commits will add the sensibility control, rotation and velocity.
from upbge.
Sure, do you have a link to a win32 or win64 build?
I don't have a suitable build environment yet, and I am terrible at it :P
On Fri, Jan 8, 2016 at 2:35 PM, panzergame [email protected] wrote:
@BluePrintRandom https://github.com/BluePrintRandom : see 205e1b4
205e1b4
in https://github.com/UPBGE/blender/tree/ge_movement_sensor. Can you test
if it work currently ? Other commits will add the sensibility control,
rotation and velocity.—
Reply to this email directly or view it on GitHub
#8 (comment).
from upbge.
BPR, since i could compile, so you could too. Look here -> http://blog.machinimatrix.org/building-blender/
from upbge.
youle helped me. I have a build with the sensor in it,
I will try and make a nice demo of what the sensor can do,
when do you think sensitivity will be in?
I was thinking about something..... what if you had 6 check boxes in a version ?
(X+ X-), (Y+,Y-) (Z+ Z-)
and if any of the checked axis are tripped, the pass a positive pulse?
So you can do if X+--------and-------play walk
if not Z+ and Z---------------/
and use far less bricks.
from upbge.
Since this feature is already implemented, I think I can close this.
from upbge.
Are all the python bindings in?
On Wed, Feb 24, 2016 at 6:34 AM, Diego Lopes [email protected]
wrote:
—
Reply to this email directly or view it on GitHub
#8 (comment).
from upbge.
Related Issues (20)
- Flatpak/Snap releases? HOT 3
- 0.3+: blenderplayer leaks reported from 6 to 8 HOT 1
- 0.3+: Parent/children replication remapping issue
- Component scripts freezing and not updating HOT 2
- 4.1: `sensor.link(controller)` and `controller.link(actuator)` seem to cause an access violation HOT 3
- UPBGE 0.3 cant go back to Previous scene
- UPBGE crashes when moving UPBGE window while game plays
- Cannot change theme of Logic Bricks Editor HOT 1
- UPBGE crashes when python script has syntax error
- UPBGE 0.4.1: instances of Collections that use "LOD"cause crash.
- development idea : build ubpge around bforartists
- Wayland Flickering UI HOT 1
- Viewport "Zoom In" using Embedded Start
- AliceLG Aden (Lookingglass for Blender)
- Suddenly Shadows Disappear, then the whole frame becomes white. HOT 1
- Feature Request: Windows MSI
- Move Depsgraph to Separate Thread
- checksum for alpha/beta development
- "use viewport render" and "sample per frame"
- Memory ingeasing till freeze while using bge.texture.VideoFFmpeg("Webcam", 0) as video texture on Linux
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upbge.