Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Sine Wave Gun

Archive: 4 posts


I'm trying my best to make a gun that shoots a sine wave and have the x axis always be the line of sight for the player. This seems to be in impossible task.

I tried shooting a round (with anti gravity) that with two movers on it. One move it closer to a line of red tags (my x axis) then when it gets close, it turns off and floats to the other side, where it repeats. The second moves it away from the player. But, the two movers won't work at the same time.

I put them on a sequencer that just switched them back and forth really fast hoping that will be like them working at the same time but i created that looks more like a schizophrenic doodle.

i played around a little more and got a square wave but its way too slow and ugly. any suggestions?
2011-02-03 04:06:00

Author:
JMoney6409
Posts: 2


https://lbpcentral.lbp-hub.com/index.php?t=19365-Logic-Blog-updated-2010-10-10

try that link, one of his blogs gives a way to approximate a sine wave using analogue signals. could maybe use that to position a mover/rod.
2011-02-03 04:24:00

Author:
pooter3001
Posts: 9


I created a sine type wave (don't know how mathematically valid it is!) in my beta shooter for aliens moving. I'll just look it up for you...

Okay, it's a convenient standalone microchip. It has two timers, one direction combiner and an advanced mover. The timers' input types are both set to direction, and both set to 2 seconds length for a 4 second wave frequency. The output of each timer leads into the input of the other timer. I set one timer's current time to 0, and the other to 2 seconds. These now alternate changing each other's direction. I then lead both outputs into the two inputs of the direction combiner, and the output of the direction combiner into the up/down of an advanced mover (for up/down movement). The end result is a wave of frequency 2x the timers' length. At 2 seconds each, a speed of 1 in the advanced move gives an amplitude of one large square. If you have a freqncy of 1 second (timers at half a second length) then one block's movement needsd a speed of 4 in the advanced mover. These movements measures are approximate.
2011-02-03 12:08:00

Author:
Shifty Geezer
Posts: 131


I like it shifty_geezer, Brilliantly simple and elegant solution!, another way maybe to shoot a stream of projectiles, i.e 10-20 bullets in quick succession per emitter activation, have the emitter or weapon 'head' on a dreaded wobble bolt set to wobble quickly back and forth over a few degrees, say 3 or 4 (tweak to suit), this could then sit on the 'arm' of the weapon which you could then aim with an advanced rotator, the result would be a stream of projectiles that would look like a sine wave but would be a 'wave' of fire you could direct in any direction. Voila! I don't know how much this method suits your requirements but I hope it helps!2011-02-03 12:32:00

Author:
CloaknBlagger
Posts: 78


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.